package com.caissa.springboot.starter.permission.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Permission对象
 * @author yuzhongbo
 * @date 2020/5/11 PM5:46
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class PermissionPo implements Serializable {
    private static final long serialVersionUID = 1L;

    //主键id
    private Long id;

    //权限名称
    @NotBlank
    private String permissionName;

    //权限状态
    @NotBlank
    private String permissionState;

    //权限类型0文件夹1菜单2按钮3数据
    @NotBlank
    private String permissionType;

    //权限URL
    private String permissionUrl;

    //权限key
    private String permissionKey;

    //权限value
    private String permissionValue;

    //权限的父级
    @NotBlank
    private Long parentId;

    //权限序号
    @NotNull
    private Integer permissionSoftnum;

    //权限是否可见 1是 0否
    @NotBlank
    private String dispalyFlag;

    //备注
    private String remarks;

    //所属系统
    @NotBlank
    private String btSystem;

    //所属用户
    private String btUser;

    //数据子权限
    public PermissionPo dataPermission;

    //按钮子权限
    public List<PermissionPo> buttonPermissions=new ArrayList<>();

}